set term png
set output "mc_markov_demon_256atom_E.png"
muB = 2
f(kT) = (-muB*exp(muB/kT) + muB*exp(-muB/kT))/(exp(muB/kT) + exp(-muB/kT))
set xlabel "kT"
set ylabel "<E>"
set key right bottom
plot [0:50] f(x) t "analytic", "mc_markov_demon_sampling_256atom.txt" u 1:2 t "sampling"

set output "mc_markov_demon_256atom_Sz.png"
g(kT) = (exp(muB/kT) - exp(-muB/kT))/(exp(muB/kT) + exp(-muB/kT))
set xlabel "kT"
set ylabel "<Sz>"
set key default
plot [0:50] g(x) t "analytic", "mc_markov_demon_sampling_256atom.txt" u 1:3 t "sampling"

